package com.hgkj.cloud.base.service.impl;

import com.hgkj.cloud.base.common.PageInfo;
import com.hgkj.cloud.base.dao.GraduationFrameworksMapper;
import com.hgkj.cloud.base.domain.GraduationFrameworks;
import com.hgkj.cloud.base.service.GraduationFrameworksService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class GraduationFrameworksServiceImpl implements GraduationFrameworksService {

    @Autowired
    private GraduationFrameworksMapper graduationFrameworksMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return graduationFrameworksMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(GraduationFrameworks record) {
        return graduationFrameworksMapper.insert(record);
    }

    @Override
    public int insertSelective(GraduationFrameworks record) {
        return graduationFrameworksMapper.insertSelective(record);
    }

    @Override
    public GraduationFrameworks selectByPrimaryKey(Long id) {
        return graduationFrameworksMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(GraduationFrameworks record) {
        return graduationFrameworksMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(GraduationFrameworks record) {
        return graduationFrameworksMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Map<String, Object>> getGraduationFrameworkByMap(PageInfo pi, Map<String, Object> map) {
        if(pi != null){
            map.put("currentCount", pi.getCurrentCount());
            map.put("pageSize", pi.getPageSize());
        }
        return graduationFrameworksMapper.getGraduationFrameworkByMap(map);
    }

    @Override
    public Long getGraduationFrameworkCountByMap(Map<String, Object> map) {
        return graduationFrameworksMapper.getGraduationFrameworkCountByMap(map);
    }
}
